<template>
  <!-- <a
    :style="{
      backgroundImage: `url(${publicUrls + 'free/style5/free3unitdigitalShowroom1.png?imageView2/format/webp'})`,
    }"
    :href="props.url"
    v-if="!store.isMobileType"
    class="unitdigitalShowroom-box"
  >
    <i class="freeIcon">&#xe63a;</i>
  </a> -->

  <div class="tooltip-box">
    <div class="tooltip-content">
      <div class="popup__arrow-parent">
        <div class="t-popup__arrow"></div>
      </div>
      <span>查看本单元全景展厅</span>
    </div>
    <a
      ref="myunitdigitalShowroom"
      :style="{
        backgroundImage: `url(${publicUrls + 'free/style9/showRoomBtn.png?imageView2/format/webp'})`,
      }"
      class="unitdigitalShowroom-box"
      :href="props.url"
      target="blank"
    >
    </a>
  </div>
  <!-- </t-tooltip> -->
</template>

<script lang="ts">
export default defineComponent({
  name: 'digitalShowroomIcon',
});
</script>

<script lang="ts" setup>
import { useRouter, useRoute } from 'vue-router';
import { publicUrls } from '@/utils/minxin';
import { useProjectStore, commonDataStore } from '@/store';
import { defineComponent, ref } from 'vue';
const commonStore = commonDataStore();
const store = useProjectStore();
const myunitdigitalShowroom = ref();
const props = defineProps({
  url: {
    type: String,
  },
  imgUrl: {
    type: String,
  },
  id: {
    type: String || Number,
  },
});
</script>

<style lang="less" scoped>
.tooltip-box {
  position: relative;
  width: 100%;
  height: 100%;
}
.unitdigitalShowroom-box {
  display: block;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.tooltip-box:hover {
  .tooltip-content {
    display: flex;
  }
}
.tooltip-content {
  width: 145px;
  display: none;
  position: absolute;
  bottom: -36px;
  left: -56px;
  border-radius: 4px;
  background: #8c7f70;
  padding: 2px 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  span {
    color: #faeedc;
    text-align: justify;
    font-family: 'Microsoft YaHei';
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px; /* 153.846% */
  }
}
.popup__arrow-parent {
  position: absolute;
  top: -4px;
}
.t-popup__arrow::before {
  background: #8c7f70;
}
</style>
